﻿<div class="blade-static __collapsed">
    <va-breadcrumb ng-model="blade.breadcrumbs" blade-id="blade.id"></va-breadcrumb>
</div>

<div class="blade-content __medium-wide">
	<div class="blade-inner">
		<div class="inner-block">
			<div class="table-wrapper">
				<table class="table" ng-if="blade.currentEntity && (blade.currentEntity.childrenFolders.length > 0 || blade.currentEntity.items.length > 0)">
					<thead>
						<tr>
							<th class="table-col">Pic</th>
							<th class="table-col">Name</th>
							<th class="table-col">Description</th>
						</tr>
					</thead>
					<tbody>
						<tr class="table-item" ng-repeat="data in blade.currentEntity.childrenFolders" ng-click="blade.folderClick(data)" context-menu data-target="ipl_menu_{{data.id}}">
							<td class="table-col __product-img">
								<div class="product-img">
									<i class="table-ico fa fa-folder"></i>
								</div>
							</td>
							<td class="table-col __product-name">
								{{data.name}}
								<ul class="menu __context" role="menu" id="ipl_menu_{{data.id}}">
									<li class="menu-item" ng-click='blade.deleteFolder(data); $event.stopPropagation();'>
										<i class="menu-ico fa fa-trash-o"></i> Delete
									</li>
									<li class="menu-item" ng-click='blade.editFolder(data); $event.stopPropagation();'>
										<i class="menu-ico fa fa-pencil-square-o"></i> Edit
									</li>
								</ul>
							</td>
							<td class="table-col">
								{{data.description}}
							</td>
						</tr>
						<tr class="table-item" ng-repeat="item in blade.currentEntity.items" ng-click="blade.editContentItem(item)">
							<td class="table-col __product-img">
								<div class="product-img">
									<i class="table-ico fa fa-location-arrow"></i>
								</div>
							</td>
							<td class="table-col __product-name">
								{{item.name}}
							</td>
							<td class="table-col">
								{{item.description}}
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="note" ng-if="(blade.currentEntity.childrenFolders.length === 0 && blade.currentEntity.items.length === 0)">
				No data
			</div>
		</div>
	</div>
</div>